<?php

use yii\helpers\Html;
use yii\grid\GridView;
use yii\widgets\ListView;
use frontend\components\HotWordsWidget;
use frontend\components\RctCreditdetailWidget;

use yii\helpers\HtmlPurifier;
use common\models\Doc;

use yii\helpers\Url;

/* @var $this yii\web\View */
/* @var $searchModel common\models\PostSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */

?>

<div class="container" style="background:#303030 ;color:#FFF">
  <div class="row">
    <ol class="breadcrumb" style="background:#303030 ;font-size:20px;color:#FFF">
		<li><a href="<?= Yii::$app->homeUrl;?>">首页</a></li>
		<li><a href="<?= Url::to(['doc/index']);?>">词条</a></li>
		<li class="active"><?= $model->title?></li>
	</ol>
     <div class="col-md-8">
			<div class="post">
				<div class="title">
					<a href="<?= $model->url;?>"><span style="font-size:18px"><?= Html::encode($model->title);?></span></a>	
                      	<br>				
						<div class="author"style="font-size:18px">
						<span class="glyphicon glyphicon-time" aria-hidden="true"></span><em><?= date('Y-m-d H:i:s',$model->time)."&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";?></em>
						<span class="glyphicon glyphicon-user" aria-hidden="true"></span>&nbsp;&nbsp;<em><?= Html::encode($model->authorname);?></em>
						</div>				
				</div>
		
			
			<br>
			
			<div class="content"style="font-size:18px">
			<?= HTMLPurifier::process($model->content)?>
			</div>
			
			<br>
			
			<div class="nav"style="font-size:18px">
				<span class="glyphicon glyphicon-tag" aria-hidden="true"></span>
				<?= implode(', ',$model->keywordLinks);?>
				<br>

				最后修改于<?= date('Y-m-d H:i:s',$model->lastedit);?>
			</div>

		
			<br>
			    <p>
                  <?= Html::a('编辑词条', ['doc/update','did' =>$model->did], ['class' => 'btn btn-success']) ?>
                </p>
			
		</div>

	 </div>
	 <div class="col-md-4" >
	 <h3>其他</h3>

			
			<div class="tagcloudbox">
				<ul class="list-group">
				  <li class="list-group-item"style="background:#303030 ;color:#FFF">
				  <h4><span class="glyphicon glyphicon-tags" aria-hidden="true"></span> 热门关键字</h4>
				  </li>
				  <li class="list-group-item"style="background:#303030 ;color:#FFF">
		
					<?= HotWordsWidget::widget(['words'=>$words])?>
				  </li>
				</ul>			
			</div>
			
			
			<div class="commentbox">
				<ul class="list-group">
				  <li class="list-group-item"style="background:#303030 ;color:#FFF">
				  <h4><span class="glyphicon glyphicon-glass" aria-hidden="true"></span> 用户贡献榜</h4>
				  </li>
				  <li class="list-group-item"style="background:#303030 ;color:#FFF">
		
					<?= RctCreditdetailWidget::widget(['recentCreditdetails'=>$recentCreditdetails])?>
				  </li>
				</ul>			
			</div>
	 </div>
  </div>
</div>
